<?php
include("include/textcenter.php"); 
include("include/db.php");
$id = $_GET['id'];
$rs_result = mysql_query("Select * from vnf_giftcard where GiftCardID=".$id);
if(isset($_POST['SubmitUpdate']))
{    
     $GiftCardNo = $_POST['GiftCardNo'];
    $Amount = $_POST['Amount'];
    $ActiveYN = $_POST['ActiveYN'];
    $BuyerID = $_POST['BuyerID'];
    $sql = "update vnf_giftcard set `GiftCardNo`='$GiftCardNo', `Amount`='$Amount', `ActiveYN`='$ActiveYN', `BuyerID`='$BuyerID' 
        where GiftCardID=".$id;
    mysql_query($sql);
    echo '<meta http-equiv="Refresh" content="0;URL=Giftcard_list.php" />';
   	return;
}

?>

<html>
<head>
<meta name="description" content="Admin<?php echo $tagdescription?>">
<meta name="keywords" content="<?php echo $tagkeywords?> Main">
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Add New Coupon<?php echo $tagtitle?></title>

<script type="text/javascript" src="simpletreemenu.js">
/***********************************************
* Simple Tree Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="simpletree.css" />
<LINK rel="StyleSheet" href="include/css_classes.css" type="text/css">



</head>



<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" link="#0000FF" vlink="#800080" alink="#FF0000" bgcolor="#FFFFFF">
<!-- -------------------Header---------------------------- -->
<?php include("include/header.php"); ?>
<!-- -------------------End Header---------------------------- -->


<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="12%" valign="top">
		<img border="0" src="public/images/homepage/spider16.gif" width="200" height="1"></td>
		<td width="1%" valign="top">
		<img border="0" src="public/images/homepage/spider16.gif" width="16" height="1"></td>
		<td width="86%" valign="top">
		<img border="0" src="public/images/homepage/spider16.gif" width="16" height="1"></td>
	</tr>	
	<tr>
		<!-- ///////////////////Begin Leftmenu/////////////////// -->
		<td width="12%" valign="top" bgcolor="#FFFFFF">
		<?php include("include/leftmenu.php"); ?>
		</td>
		<!-- ///////////////////End Leftmenu/////////////////// -->
		
		<td width="1%" valign="top" background="public/images/homepage/16.gif">&nbsp;</td>
		<td width="86%" valign="top">
	<br>
<!-- -------------------Begin Body---------------------------- -->
<p class="title16B">&nbsp;Add New Oem</p>
<form method="POST" action="" name="member" enctype="multipart/form-data">

	<table border="1" width="800" cellspacing="0" bordercolor="#FFF4FF" bgcolor="#FFFFFF">
<?php
    while ($row = mysql_fetch_assoc($rs_result))
 {
?>
		<tr>
			<td valign="top" width="180" align="right">GiftCardNo</td>
			<td valign="top" width="620">
			<input type="text" name="GiftCardNo" size="20" value="<?php echo $row['GiftCardNo'] ?>" /></td>
		</tr>
		<tr>
			<td valign="top" width="180" align="right">Amount</td>
			<td valign="top" width="620">
			<input type="text" name="Amount" size="80" value="<?php echo $row['Amount'] ?>"/></td>
		</tr>
		<tr>
			<td valign="top" width="180" align="right">ActiveYN</td>
			<td valign="top" width="620">
                <select name="ActiveYN" id="ActiveYN">
                <?php
                    if($row['ActiveYN'] == 1)
                    {
                ?>
                    <option value="1">Yes</option>
                <?php
                    }
                    else
                    {
                ?>
                    <option value="0">No</option>
                <?php
                    }
                ?>
                </select>
            </td>
		</tr>
        <tr>
			<td valign="top" width="180" align="right">BuyerID</td>
			<td valign="top" width="620">
  	             <input type="text" name="BuyerID" id="BuyerID" value="<?php echo $row['BuyerID'] ?>"/>
            </td>
		</tr>
<?php
    }
?>
		<tr>
			<td valign="top" width="180" align="right">&nbsp;</td>
			<td valign="top" width="620">
			<input type="submit" value="Update Giftcard" name="SubmitUpdate" /></td>
		</tr>
	</table>
	<p><br>
&nbsp;</p>
</form>

		<p>&nbsp;</p>
<!-- -------------------End Body---------------------------- -->

&nbsp;</td>
	</tr>

</table>
</div>
<!-- ----------------------------------------------- -->
<!-- \\\\\\\\\\\\\\\\\\\\\Begin Footer\\\\\\\\\\\\\\\\\\\\\ -->
<?php include("include/footer.php"); ?>
<!-- \\\\\\\\\\\\\\\\\\\\\End Footer\\\\\\\\\\\\\\\\\\\\\ -->
</body>

</html>